//PSRM Replication File - Mobilizing Voters with Aggressive Metaphors

//Study 2
use "KN Data.dta", clear
set more off

//Variable Coding

//Treatment: 1=2 aggressive, 0.5=1 aggressive, 0=aggressive
gen viol1=GROUP
recode viol1 1 2=1 3 4=0

gen viol2=GROUP
recode viol2 1 3=1 2 4=0

gen violviol=viol1*viol2

gen viol=0
recode viol 0=1 if viol1==1|viol2==1

gen violonly=viol
recode violonly 1=0 if violviol==1

gen viol1only=GROUP
recode viol1only 1=0 2=1 3 4=0 

gen viol2only=GROUP
recode viol2only 1 2=0 3=1 4=0 

gen violboth=GROUP
recode violboth 1=1 2 3 4=0

gen viol3=violonly
recode viol3 1=.5
recode viol3 0=1 if violboth==1

//Participation Motives
gen electattn=Q6
recode electattn 1=1 2=.75 3=.5 4=.25 5=0 else=.5

gen offcare=Q7
recode offcare 5=1 4=.75 3=.5 2=.25 1=0 else=.5

gen exteff=(electattn+offcare)/2

gen rep7=Q1
recode rep7 1=1 2=0 3 4 5 -1=.5 
recode rep7 1 =.83 if Q2==2
recode rep7 0=.17 if Q3==2
recode rep7 .5=.67 if Q4==1
recode rep7 .5=.33 if Q4==2
recode rep7 .=.5
gen pidstren=rep7
recode pidstren 0 1=1 .17 .83=.67 .33 .67=.33 .5=0 else=0

alpha pidstren electattn offcare, gen(commitment)

//Trait Aggression (independent variable)
//12-item index, excludes any who miss more than 1 of the 3-item sub-indices
gen blows=Q5_1
recode blows 1=1 2=.8 3=.6 4=.4 5=.2 6=0 else=.
gen blowsmiss=blows
recode blowsmiss .=1 else=0
gen hit=Q5_2
recode hit 1=1 2=.8 3=.6 4=.4 5=.2 6=0 else=.
gen hitmiss=hit
recode hitmiss .=1 else=0
gen threaten=Q5_3
recode threaten 1=1 2=.8 3=.6 4=.4 5=.2 6=0 else=.
gen threatenmiss=threaten
recode threatenmiss .=1 else=0
recode blows .=0
recode hit .=0 
gen paggmiss=(blowsmiss+hitmiss+threatenmiss)
recode threaten .=0
gen paggress=(blows+hit+threaten)/(3-paggmiss) if paggmiss<2
gen pagg_2=paggress
recode pagg_2 0=0 .01/.31=.5 .32/1=1
gen pagg_3=paggress
recode pagg_3 .=. 0=0 else=1

gen disagree=Q5_4
recode disagree 1=1 2=.8 3=.6 4=.4 5=.2 6=0 else=.
gen disagreemiss=disagree
recode disagreemiss .=1 else=0
gen arguedis=Q5_5
recode arguedis 1=1 2=.8 3=.6 4=.4 5=.2 6=0 else=.
gen arguedismiss=arguedis
recode arguedismiss .=1 else=0
gen argue=Q5_6
recode argue 1=1 2=.8 3=.6 4=.4 5=.2 6=0 else=.
gen arguemiss=argue
recode arguemiss .=1 else=0
recode disagree .=0
recode arguedis .=0
recode argue .=0
gen vaggmiss=(disagreemiss+arguedismiss+arguemiss)
gen vaggress=(disagree+arguedis+argue)/(3-vaggmiss) if vaggmiss<2

gen temper=Q5_7
recode temper 1=1 2=.8 3=.6 4=.4 5=.2 6=0 else=.
gen tempermiss=temper
recode tempermiss .=1 else=0
gen handle=Q5_8
recode handle 1=1 2=.8 3=.6 4=.4 5=.2 6=0 else=.
gen handlemiss=handle
recode handlemiss .=1 else=0
gen flare=Q5_9
recode flare 1=1 2=.8 3=.6 4=.4 5=.2 6=0 else=.
gen flaremiss=flare
recode flaremiss .=1 else=0
recode temper .=0
recode handle .=0 
recode flare .=0
gen aaggmiss=(tempermiss+handlemiss+flaremiss)
gen aaggress=(temper+handle+flare)/(3-aaggmiss) if aaggmiss<2

gen raw=Q5_10
recode raw 1=1 2=.8 3=.6 4=.4 5=.2 6=0 else=.
gen rawmiss=raw
recode rawmiss .=1 else=0
gen breaks=Q5_11
recode breaks 1=1 2=.8 3=.6 4=.4 5=.2 6=0 else=.
gen breaksmiss=breaks
recode breaksmiss .=1 else=0
gen bitter=Q5_12
recode bitter 1=1 2=.8 3=.6 4=.4 5=.2 6=0 else=.
gen bittermiss=bitter
recode bittermiss .=1 else=0
recode raw .=0 
recode breaks .=0
recode bitter .=0
gen haggmiss=(rawmiss+breaksmiss+bittermiss)
gen haggress=(raw+breaks+bitter)/(3-haggmiss) if haggmiss<2

gen aggmiss=(paggmiss+vaggmiss+aaggmiss+haggmiss)
gen passaggmiss=(aaggmiss+haggmiss)
gen aggress=(paggress+vaggress+aaggress+haggress)/4 if paggmiss<2 & vaggmiss<2 & aaggmiss<2 & haggmiss<2
recode blows 0=. if blowsmiss==1
recode hit 0=. if hitmiss==1
recode threaten 0=. if threatenmiss==1
recode disagree 0=. if disagreemiss==1
recode arguedis 0=. if arguedismiss==1
recode argue 0=. if arguemiss==1
recode temper 0=. if tempermiss==1
recode handle 0=. if handlemiss==1
recode flare 0=. if flaremiss==1
recode raw 0=. if rawmiss==1
recode breaks 0=. if breaksmiss==1
recode bitter 0=. if bittermiss==1

//Interaction Terms for IVs
gen aggressxcommitment=aggress*commitment
gen violxaggress=viol*aggress
gen violxcommitment=viol*commitment
gen violxaggxcommitment=viol*aggress*commitment

gen viol3xaggress=viol3*aggress
gen viol3xcommitment=viol3*commitment
gen viol3xaggxcommitment=viol3*aggress*commitment

gen aggressxexteff=aggress*exteff
gen violxexteff=viol*exteff
gen violxaggxexteff=viol*aggress*exteff

gen aggressxpidstren=aggress*pidstren
gen violxpidstren=viol*pidstren
gen violxaggxpidstren=viol*aggress*pidstren

//Dependent Variables - Voting, other campaign participation
gen vote=Q16
recode vote 1=. 2=1 3=.75 4=.5 5=.25 6=0 else=.

gen persuade=Q17
recode persuade 1=1 2=.75 3=.5 4=.25 5=0 else=.

gen contrib=Q18
recode contrib 1=1 2=.75 3=.5 4=.25 5=0 else=.

gen sign=Q19
recode sign 1=1 2=.75 3=.5 4=.25 5=0 else=.

gen attend=Q20
recode attend 1=1 2=.75 3=.5 4=.25 5=0 else=.

gen discuss=Q22
recode discuss 1=1 2=.75 3=.5 4=.25 5=0 else=.

gen particnovote=(persuade+contrib+sign+attend+discuss)/5

//Descriptive Statistics (p. 8-9)
tab PPGENDER
tab PPETHM
su PPAGE

//Dependent Variables (p. 10)
su vote
su particnovote
alpha persuade contrib sign attend discuss

//Indepdendent Variables
//Trait Aggression (p. 11)
alpha blows hit threaten disagree arguedis argue temper handle flare raw breaks bitter
su aggress
tab aggress

//Participation Motives (p. 12)
alpha pidstren electattn offcare
su commitment

//Controls
gen edu=PPEDUCAT
recode edu 1=0 2 3=.5 4=1 else=.

gen income=PPINCIMP
recode income 15 16 17 18 19=1 12 13 14=.67 11 10 9 8=.33 1 2 3 4 5 6 7=0

gen white=PPETHM
recode white 1=1 2 3 4 5=0 else=.

gen fem=PPGENDER
recode fem 1=0 2=1 else=.

gen age=PPAGE

//Main Text Models

//F.N. 7 for net effects
reg vote viol
reg particnovote viol

//Table I
reg vote viol aggress violxaggress
reg vote viol aggress commitment aggressxcommitment violxaggress violxcommitment violxaggxcommit

//Table II
reg particnovote viol aggress violxaggress
reg particnovote viol aggress commitment aggressxcommitment violxaggress violxcommitment violxaggxcommit


//Online Supplement Models

//Figure A2
histogram aggress, bin(10) percent ytitle(Percent) xtitle(Trait Aggression) xlabel(0(.2)1) scheme(s1mono)

//Table A1 Ordered Probit Voting Models
oprobit vote viol aggress commitment aggressxcommitment violxaggress violxcommitment violxaggxcommit, nolog

//Table A2 Ordered Probit Participation Models
oprobit particnovote viol aggress commitment aggressxcommitment violxaggress violxcommitment violxaggxcommit, nolog

//Table A3 Disaggregated Motivations Voting Models
reg vote viol aggress pidstren aggressxpidstren violxaggress violxpidstren violxaggxpidstren
reg vote viol aggress exteff aggressxexteff violxaggress violxexteff violxaggxexteff

//Table A4 Disaggregated Motivations Participation Models
reg particnovote viol aggress pidstren aggressxpidstren violxaggress violxpidstren violxaggxpidstren
reg particnovote viol aggress exteff aggressxexteff violxaggress violxexteff violxaggxexteff

//Table A5 Additive Metaphor Exposure Models
reg vote viol3 aggress commitment aggressxcommitment viol3xaggress viol3xcommitment viol3xaggxcommit
reg particnovote viol3 aggress commitment aggressxcommitment viol3xaggress viol3xcommitment viol3xaggxcommit

//Table A6 Disaggregated Participation Outcomes Models
reg contrib viol aggress commitment aggressxcommitment violxaggress violxcommitment violxaggxcommit
reg persuade viol aggress commitment aggressxcommitment violxaggress violxcommitment violxaggxcommit
reg sign viol aggress commitment aggressxcommitment violxaggress violxcommitment violxaggxcommit
reg attend viol aggress commitment aggressxcommitment violxaggress violxcommitment violxaggxcommit
reg discuss viol aggress commitment aggressxcommitment violxaggress violxcommitment violxaggxcommit

//Table A7 Vote Models with Controls
reg vote viol aggress violxaggress edu income white fem age
reg vote viol aggress commitment aggressxcommitment violxaggress violxcommitment violxaggxcommit edu income white fem age

//NOTE: Do-files creating marginal effects figures are uploaded separately.
//Figure 1, Figure 2, Figure A1
